#! /bin/sh /usr/share/dpatch/dpatch-run
## 01_pic_py.dpatch by LI Daobing <lidaobing@gmail.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: SF bug#1829645.

@DPATCH@
diff -urNad yac163~/Pic.py yac163/Pic.py
--- yac163~/Pic.py	2007-12-28 23:01:25.000000000 +0800
+++ yac163/Pic.py	2007-12-28 23:01:51.000000000 +0800
@@ -707,7 +707,10 @@
         return False
 
     def view_thumbnail (self):
-        (n,filename) = tempfile.mkstemp(mimetypes.guess_extension(self.format),'client163_')
+        ext = mimetypes.guess_extension(self.format)
+        if ext is None:
+            ext = ''
+        (n,filename) = tempfile.mkstemp(ext, 'client163_')
         fhdr = open(filename,'w')
         msgl(_("download thumbnail..."))
         (flag,data) = get_url_data (self.remote_thumbnail,assume_main_mimetype='image')
